<?php
/* @var $this RobotController */
/* @var $model Robot */
/* @var $form CActiveForm */
?>

<div class="form">

<?php $form=$this->beginWidget('CActiveForm', array(
	'id'=>'robot-form',
	'enableAjaxValidation'=>false,
)); ?>

	<p class="note">Fields with <span class="required">*</span> are required.</p>

	<?php echo $form->errorSummary($model); ?>

	<div class="row">
		<?php echo $form->labelEx($model,'name'); ?>
		<?php echo $form->textField($model,'name',array('size'=>60,'maxlength'=>128)); ?>
		<?php echo $form->error($model,'name'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'taskid'); ?>
		 

		<?php
		    echo $form->dropDownList(
		            $model, 
		            'taskid', 
		            CHtml::listData(
		                    Task::model()->findAll(), 
		                    'id', 
		                    'title'
		                    )
		      );
		?>

		<?php echo $form->error($model,'taskid'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'lasttime'); ?>
		<?php echo $form->textField($model,'lasttime'); ?>
		<?php echo $form->error($model,'lasttime'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'stat'); ?>
		<?php echo $form->textField($model,'stat'); ?>
		<?php echo $form->error($model,'stat'); ?>
	</div>

	<div class="row buttons">
		<?php echo CHtml::submitButton($model->isNewRecord ? 'Create' : 'Save'); ?>
	</div>

<?php $this->endWidget(); ?>

</div><!-- form -->